package ooday01;
/** Car类的测试类*/
public class CarTest {
    public static void main(String[] args) {
        Car bm = new Car();//关键一个汽车对象
        //访问成员变量
        bm.brand ="宝马";
        bm.color ="白色";
        bm.price = 600000;
        bm.capacity = 5;
        //调用方法
        bm.start();
        bm.run();
        bm.stop();


        Car bc = new Car();
        bc.brand = "奔驰";
        bc.color = "黑色";
        bc.price = 900000;
        bc.capacity = 6;
        bc.stop();
        bc.run();
        bc.start();


        Car ad = new Car();
        ad.start();
        ad.run();
        ad.stop();

    }
}
